home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / dvlprstc.hqx / Developer Stack 1.3r / card_5814.txt < prev    next >
Encoding:
Text File  |  1991-04-30  |  2.2 KB  |  72 lines

  1. -- card: 5814 from stack: in.3r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2612
  5. -- name: Alert
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=197 top=232 right=282 bottom=263
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 27056 / 27056
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Try it...
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   Alert 2,3,"This is a test of Alert XCMD", 1
  23.   put the result
  24. end mouseUp
  25.  
  26.  
  27.  
  28. -- part contents for background part 13
  29. ----- text -----
  30. 38
  31.  
  32. -- part contents for background part 30
  33. ----- text -----
  34. XCMD
  35.  
  36. -- part contents for background part 2
  37. ----- text -----
  38. Alert
  39.  
  40. -- part contents for background part 3
  41. ----- text -----
  42.  
  43. This XCMD gives you access to the Toolbox routines for doing alert dialogs. 
  44.  
  45. This XCMD comes from:
  46. Maurice Volaski
  47. 29 Callodine Ave.
  48. Amherst, NY 14226-3125
  49. phone 1-716-838-6663.
  50.  
  51.  
  52. ΓÇóΓÇóMaurice is another supporter of the Developer Stack who has taken the time to contribute this XCMD.  We appreciate his efforts.  [Editor]
  53.  
  54. -- part contents for background part 10
  55. ----- text -----
  56. Syntax:
  57.  
  58.  Alert <iconType>,<Buttons>,<text>,<beep>
  59.  
  60. For the first parameter, you can specify an integer for each of the three alert dialog icons,1 for the note icon, 2 for the caution icon, and 3 for the stop icon. 
  61.  
  62. For the second parameter, you can specify whether you want 1 for an OK button, 2 for a Cancel button, 3 for an OK button and a Cancel button with either the OK button highlighted (with a double border, which indicates that the button accepts the return or enter key) or 4 with the Cancel button highlighted.
  63.  
  64. For the third parameter, you can specify text of up to 255 characters to be inserted in the alert dialog. Because the scripting line with the XCMD must be one line, you can use a variable as a container for the text in order to keep the XCMD line on one line.
  65.  
  66. For the fourth parameter, specify 0 for no beep sound when the alert appears. Specify 1 if you want a beep sound when the alert appears.
  67.  
  68.  
  69. The XCMD returns an integer value to the function the result only for alert dialogs with two buttons. 1 is returned for OK, and 2 is returned for Cancel.
  70.  
  71.  
  72.